package com.csu.ui;

import java.awt.Color;

import javax.swing.*;

import com.csu.consts.UiConsts;
import com.csu.db.DBUtils;
import com.csu.panel.InfoPanel_Medium;
import com.csu.panel.TransactionPanel_Right;
import com.csu.panel.UserPanel_Right;

public class HomePanel extends JPanel {

    private JPanel jPanel;
    private InfoPanel_Medium infoPanel_medium;
    private UserPanel_Right userPanel_right;
    private TransactionPanel_Right transactionPanel_right;
    private JLabel label_overview;

	HomePanel(){

        setLayout(null);

        infoPanel_medium = new InfoPanel_Medium();
        infoPanel_medium.setBounds( 0, 100, 830, 760 );


        userPanel_right = new UserPanel_Right();
        userPanel_right.setBounds( 830, 100, UiConsts.WIDTH_USER_PANEL, UiConsts.HEIGHT_USER_PANEL );


        transactionPanel_right = new TransactionPanel_Right();
        transactionPanel_right.setBounds( 830, 310, UiConsts.WIDTH_RC_TRANSACTION_PANEL, UiConsts.HEIGHT_RC_TRANSACTION_PANEL );

        label_overview = new JLabel("概览");
        label_overview.setFont(UiConsts.FONT_TITLE);
        label_overview.setVerticalTextPosition(JLabel.TOP);
        label_overview.setHorizontalTextPosition(JLabel.LEFT);
        label_overview.setBounds(50, 40, 100, 50 );
        label_overview.setForeground(UiConsts.COLOR_NAVY_BLUE);


        jPanel = new JPanel();
        jPanel.setBounds(0,0,1110,860);
        jPanel.setBackground(Color.white);
        jPanel.setLayout(null);
        jPanel.add(label_overview);
        jPanel.add(infoPanel_medium);
        jPanel.add(userPanel_right);
        jPanel.add(transactionPanel_right);
        this.add(jPanel);


        transactionPanel_right.inniRcTrans(DBUtils.getExpenditureData());

	}

}
